﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Edge.Business.Entities;
using Edge.Common.Utils;
using Iesi.Collections.Generic;
using Shop.Business.Domain.Customers;

namespace Shop.Business.Domain.Catalog
{
    /// <summary>
    /// Users object for NHibernate mapped table 'category'.
    /// </summary>
    [Serializable]
    public class Category : EntityWithStat<int>
    {

        protected string name;
        protected string description;
        protected Category parentCategory;
        protected ISet<Category> childCategory;
        protected int discount = 0;
        protected string seo;
        //protected ICollection<ProductGroup> childProductGroup;

        public virtual string Name
        {
            get { return name; }
            set { name = value; }
        }

        public virtual string Description
        {
            get { return description; }
            set { description = value; }
        }

        public virtual Category ParentCategory
        {
            get { return parentCategory; }
            set { parentCategory = value; }
        }

        public virtual string Seo
        {
            get { return seo; }
            set { seo = value; }
        }

        public virtual ISet<Category> Children
        {
            get { return childCategory; }
            set { childCategory = value; }
        }

        public virtual int Discount
        {
            get { return discount; }
            set { discount = value; }
        }

        public Category()
        {
        }

        public Category(string name, string description)
        {
            this.name = name;
            this.description = description;
        }

        public Category(string name, string description, Category parentCategory)
        {
            this.name = name;
            this.description = description;
            this.parentCategory = parentCategory;
        }
    }

}